<?php
use yii\helpers\Html;
use yii\widgets\DetailView;
use yii\widgets\LinkPager;
use yii\helpers\Url;
$this->params['breadcrumbs'][] = $this->title;
?>

<div class="content-wrap positionr">
   
   
<div class="countCenter aboutUs helpCenter">

  <div class="mcCont mcgCont">
    <div class="content-wrap">
      <div class="countNavs left">
        <h1 class="pageTt">帮助中心<i class="iconfont icon-doubt"></i></h1>
        <ul class="aboutUsNavs">

        <?php if ($footer_list): ?>
          <?php foreach ($footer_list[0] as $k => $v): ?>
            <?php if ($k<6): ?>
              <li>
                <dl class="subLists">
                  <dt><?=Html::encode($v)?></dt>

                  <?php foreach ($footer_list[1][$k] as $key => $value): ?>
                    <dd>
                      <a href="/help/<?=Html::encode($value['id'])?>"><?=Html::encode($value['title'])?>
                        <i class="iconfont icon-right"></i>
                      </a>
                    </dd>
                  <?php endforeach ?>

                </dl>
              </li>
            <?php endif ?>
          <?php endforeach ?>
        <?php endif ?>

          <!-- <li>
            <dl class="subLists">
              <dt>新手指南</dt>
              <dd><a href="/help/1">正品保障<i class="iconfont icon-right"></i></a></dd>
              <dd class="active"><a href="/help/2">常见问题<i class="iconfont icon-right"></i></a></dd>
            </dl>
          </li>
         <li>
            <dl class="subLists">
              <dt>支付配送</dt>
              <dd><a href="/help/3">在线支付<i class="iconfont icon-right"></i></a></dd>
              <dd><a href="/help/4">物流运输<i class="iconfont icon-right"></i></a></dd>
              <dd><a href="/help/5">签收验货<i class="iconfont icon-right"></i></a></dd>
            </dl>
          </li>
          <li >
            <dl class="subLists">
              <dt>关于我们</dt>
              <dd><a href="/help/6">关于添品<i class="iconfont icon-right"></i></a></dd>
              <dd><a href="/help/7">联系客服<i class="iconfont icon-right"></i></a></dd>
            </dl>
          </li> -->
        </ul>
      </div>
       <div class="right aboutCont announceDetail">
        <div class="aboutTxt">
        <?php
        //var_dump($model
            
      
            if($model):
            
            ?>
        <!--   <h1 class="tt"><a href="/post" class="btn-small-default right moreBtn">更多</a></h1> -->
          <div class="txt">
            <h1 class="tt1"><?= Html::encode($model->title);?>
          
            </h1>
            <!-- <p class="time"> <?= $model->create_at;?></p> -->
            <p class="txt1"> <?php
                if ($model->desc) {
                    echo \yii\helpers\HtmlPurifier::process($model->desc);
                } /*else {
                    echo Html::encode(@mb_substr(trim(strip_tags($model->content)),0, 30,'utf-8'));
                }*/
                
                ?></p>
            <div class="img7"><img src="" alt=""> <?php
                if ($model->content) {
                    echo \yii\helpers\HtmlPurifier::process($model->content);//'<img class="img-responsive" src="'..'" alt="">
                    //<hr>
                    //';
                }
                ?></div> 
           


          </div>

            <?php
            else:
                echo '没有找到合适内容';
            endif;
            ?>
        </div>
      </div>
    </div>
  </div>


</div>
</div>
 <script>
  $(function(){
    $('.subLists dd').attr('class','');
    $id = <?php echo intval(@$model->id);?>;
    if($id){
        var i = parseInt($id-1);
        $(".subLists dd:eq("+i+")").attr('class','active').siblings().attr('class','');
    }
    $('#lv1_nav a').attr('class','');
    if(<?=Yii::$app->request->get('id')?> == 2){
      $('#rightnav a').eq(1).attr('style','background: #3eb60e none repeat scroll 0 0;');
    }else if(<?=Yii::$app->request->get('id')?> == 6){
      $('#rightnav a').eq(0).attr('style','background: #3eb60e none repeat scroll 0 0;');
    }

    /*$('.subLists').children('dt').click(function(e){
      e.preventDefault();
      var $dds=$(this).siblings('dd');
      if($dds.css('display')=='none'){
        $dds.css('display','block');
      }else {
        $dds.css('display','none');
      }
    })*/
    
})
</script>